import React from 'react';
import ReactDOM from 'react-dom/client';
import Tracing, { TracingProps } from './components/Tracing/Tracing';

const tracingProps: TracingProps = {
  tracing: {
    version: 1,
    startTime: '2025-05-28T15:09:47.968473Z',
    endTime: '2025-05-28T15:09:47.9965642Z',
    duration: 28091200,
    parsing: {
      startOffset: 600,
      duration: 57499,
    },
    validation: {
      startOffset: 60900,
      duration: 601800,
    },
    execution: {
      resolvers: [
        {
          path: ['componentsByType'],
          parentType: 'LedgerQueries',
          fieldName: 'componentsByType',
          returnType: '_IComponentConnection',
          startOffset: 701700,
          duration: 15342899,
        },
        {
          path: ['ms', 'Component_ByType'],
          parentType: null,
          fieldName: null,
          returnType: null,
          startOffset: 770700,
          duration: 14378800,
        },
        {
          path: ['spReader', 'Lgr_C_Components_rMs_ByType_2K'],
          parentType: null,
          fieldName: null,
          returnType: null,
          startOffset: 4244300,
          duration: 9837199,
        },
        {
          path: ['componentsByType', 'totalCount'],
          parentType: '_IComponentConnection',
          fieldName: 'totalCount',
          returnType: 'Int',
          startOffset: 16125199,
          duration: 15699,
        },
        {
          path: ['componentsByType', 'items'],
          parentType: '_IComponentConnection',
          fieldName: 'items',
          returnType: '[IComponent]',
          startOffset: 16149200,
          duration: 18299,
        },
        {
          path: ['componentsByType', 'items', 0, 'id'],
          parentType: 'PayIdInputHandler',
          fieldName: 'id',
          returnType: 'ID!',
          startOffset: 16266400,
          duration: 192299,
        },
        {
          path: ['componentsByType', 'items', 0, 'partition'],
          parentType: 'PayIdInputHandler',
          fieldName: 'partition',
          returnType: 'Partition',
          startOffset: 16464000,
          duration: 11563100,
        },
        {
          path: ['m', 'Partition'],
          parentType: null,
          fieldName: null,
          returnType: null,
          startOffset: 16643700,
          duration: 10905699,
        },
        {
          path: ['componentsByType', 'items', 0, 'type'],
          parentType: 'PayIdInputHandler',
          fieldName: 'type',
          returnType: 'ComponentTypeEnum!',
          startOffset: 16746300,
          duration: 1500,
        },
        {
          path: ['componentsByType', 'items', 0, 'subtype'],
          parentType: 'PayIdInputHandler',
          fieldName: 'subtype',
          returnType: 'String',
          startOffset: 16757300,
          duration: 499,
        },
        {
          path: ['componentsByType', 'items', 0, 'name'],
          parentType: 'PayIdInputHandler',
          fieldName: 'name',
          returnType: 'String!',
          startOffset: 16759699,
          duration: 199,
        },
        {
          path: ['componentsByType', 'items', 0, 'version'],
          parentType: 'PayIdInputHandler',
          fieldName: 'version',
          returnType: 'String!',
          startOffset: 16762200,
          duration: 299,
        },
        {
          path: ['componentsByType', 'items', 0, 'commonComponentId'],
          parentType: 'PayIdInputHandler',
          fieldName: 'commonComponentId',
          returnType: 'String!',
          startOffset: 16763700,
          duration: 599,
        },
        {
          path: ['componentsByType', 'items', 0, 'identityHash'],
          parentType: 'PayIdInputHandler',
          fieldName: 'identityHash',
          returnType: 'String!',
          startOffset: 16765099,
          duration: 399,
        },
        {
          path: ['componentsByType', 'items', 0, 'versionProperties'],
          parentType: 'PayIdInputHandler',
          fieldName: 'versionProperties',
          returnType: 'ComponentVersion!',
          startOffset: 16767200,
          duration: 8400,
        },
        {
          path: ['componentsByType', 'items', 0, 'releaseDate'],
          parentType: 'PayIdInputHandler',
          fieldName: 'releaseDate',
          returnType: 'DateTime',
          startOffset: 16788300,
          duration: 3800,
        },
        {
          path: ['componentsByType', 'items', 0, 'metaRoles'],
          parentType: 'PayIdInputHandler',
          fieldName: 'metaRoles',
          returnType: '[ComponentRole]!',
          startOffset: 16793199,
          duration: 3500,
        },
        {
          path: ['componentsByType', 'items', 0, 'category'],
          parentType: 'PayIdInputHandler',
          fieldName: 'category',
          returnType: 'String',
          startOffset: 16801000,
          duration: 2300,
        },
        {
          path: ['componentsByType', 'items', 0, 'description'],
          parentType: 'PayIdInputHandler',
          fieldName: 'description',
          returnType: 'String',
          startOffset: 16804300,
          duration: 2399,
        },
        {
          path: ['componentsByType', 'items', 0, 'handlerType'],
          parentType: 'PayIdInputHandler',
          fieldName: 'handlerType',
          returnType: 'InputHandlerTypeEnum!',
          startOffset: 16808000,
          duration: 499,
        },
        {
          path: ['componentsByType', 'items', 0, 'message'],
          parentType: 'PayIdInputHandler',
          fieldName: 'message',
          returnType: 'String',
          startOffset: 16813000,
          duration: 3299,
        },
        {
          path: ['componentsByType', 'items', 0, 'serializationType'],
          parentType: 'PayIdInputHandler',
          fieldName: 'serializationType',
          returnType: 'SerializationTypeEnum!',
          startOffset: 16818300,
          duration: 399,
        },
        {
          path: ['componentsByType', 'items', 0, 'payAccountType'],
          parentType: 'PayIdInputHandler',
          fieldName: 'payAccountType',
          returnType: 'PayAccountTypeEnum!',
          startOffset: 16823699,
          duration: 500,
        },
        {
          path: ['componentsByType', 'items', 0, 'versionProperties', 'major'],
          parentType: 'ComponentVersion',
          fieldName: 'major',
          returnType: 'Long!',
          startOffset: 16828800,
          duration: 599,
        },
        {
          path: ['componentsByType', 'items', 0, 'versionProperties', 'minor'],
          parentType: 'ComponentVersion',
          fieldName: 'minor',
          returnType: 'Long!',
          startOffset: 16830700,
          duration: 499,
        },
        {
          path: ['componentsByType', 'items', 0, 'versionProperties', 'revision'],
          parentType: 'ComponentVersion',
          fieldName: 'revision',
          returnType: 'Long!',
          startOffset: 16832000,
          duration: 199,
        },
        {
          path: ['spReader', 'Core_Partitions_ReadCurrentModel_ById'],
          parentType: null,
          fieldName: null,
          returnType: null,
          startOffset: 22137500,
          duration: 4964800,
        },
        {
          path: ['componentsByType', 'items', 0, 'partition', 'key'],
          parentType: 'Partition',
          fieldName: 'key',
          returnType: 'String!',
          startOffset: 28051600,
          duration: 3799,
        },
      ],
    },
  },
  startTime: 1748444987968, // in ms
  endTime: 1748444987996, // in ms
};
ReactDOM.createRoot(document.getElementById('root')!).render(
  <React.StrictMode>
    <Tracing {...tracingProps} />
  </React.StrictMode>
);
